<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />
		<script type="text/javascript" src="../js/jquery-1.8.0.min.js" ></script>
		<script type="text/javascript" src="../js/head_public.js" ></script>
		<style>
			.baocun{color: #fff;border: 1px solid #fff;background: #ff7e00;position: absolute;z-index: 10;top: 0.12rem;right: 0.2rem;}
		    .xinbie{width: 95%;margin: auto;overflow: hidden;color: #666;}
		    .radio-div img{display: inline-block;width: 0.4rem;}
            .radio-div{padding: 0.3rem 0px;}
            .imgbtn{display: block;float: left;width: 30%;margin-right: 1.5%;} 
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav ding-bar">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">巡查反馈</h1>
		</header>
		<div class="mui-content" >
		    <form class="changep-form" >
		    	<div style="background: #fff;">
		    		<p style="border: none;">
		    			<span>电梯编号：</span>
			    		<input type="text" readonly="readonly" id="code" />
			    	</p>
		    	</div>
		    	<!--<div class="kong" ></div>
		    	<div style="background: #fff;">
		    		<p style="border: none;background: #fff;">
			    		<span style="width: 100%;padding-top: 3px;font-size: 0.35rem;">电梯位置</span>
			    		<textarea placeholder="请输入电梯位置" style="display: block;border: none;font-size: 0.35rem;width: 100%;"></textarea>
			    	</p>
		    	</div>-->
		    	<div class="kong" ></div>
		    	<div style="background: #fff;">
		    		<p style="border: none;background: #fff;">
			    		<span style="width: 100%;padding-top: 3px;font-size: 14px">巡查情况：</span>
			    		<textarea placeholder="请输入巡查情况" id="content" style="display: block;border: none;font-size: 14px;width: 100%;"></textarea>
			    	</p>
		    	</div>
		    	<div class="kong"></div>
		    	<div style="background: #efeff4;padding: 2px 0px;">
		        	 <button class="ch-ph-btn" type="button" style="font-weight: bold;letter-spacing: 2px;">提交</button>
		        </div>
		        <h1 id="resutl"></h1>
		    </form>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/common.js"></script>
		<script src="../js/session.js"></script>
		<script type="text/javascript">
		mui.init()
//  	判断登录与否
        var userid=getCookie("userid")
        var work=getCookie("work")
        var work_id=getCookie("workid")      	
        var code=getQueryString("code");
        $("#code").val(code)
//      if(code==""||code==null){
//      	alert("电梯编码不正确，请扫电梯码")
//      	location.href="../public/saoma.html"
//      }
		if(userid==null||userid==""){
			alert("您还没有登录，请登录")
			mui.openWindow({url:"login.html"})
		}else{
		    if(work!="1"){
				alert("您不是管理员,您没有权限")
				mui.openWindow({url:"../public/index.html"})
			}
		}
		var data={};
		data.member_id=userid;
		data.member_work=work;
		data.work_id=work_id;
		mui("form").on("tap",".ch-ph-btn",function(){
			var content=$("#content").val()
			if(content==""||content==null){
				alert("巡查情况不能为空")
			}else{
				data.contnet=content;
			}
			data.ecode=code;
			$.post(net+"/public/index.php?s=api/elevator/patrol",data,function(res){
				if(res.code=="200"){
					alert("提交完成");
					mui.back();
				}
			})
		})
		
          
		</script>
	</body>

</html>